﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpArch.Domain.DomainModel;
using System.ComponentModel.DataAnnotations;

namespace ADIGRE.Domain
{
    public class LogAcesso : Entity
    {
        [Display(Name="Usuario"),Required]
        public virtual Usuario Usuario { get; set; }
        [Display(Name="Login"), Required, DisplayFormat(DataFormatString="0:dd/MM/yyyy HH:mm:ss")]
        public virtual DateTime? DtLogin { get; set; }
        [Display(Name = "Logout"), DisplayFormat(DataFormatString = "0:dd/MM/yyyy HH:mm:ss")]
        public virtual DateTime? DtLogout { get; set; }

        public LogAcesso(Usuario Usuario)
        {
            this.DtLogin = DateTime.Now;
            this.Usuario = Usuario;

        }

        public LogAcesso()
        {
            this.DtLogin = DateTime.Now;
        }
    }
}
